package org.misalen.web.database.model.mysql.pro;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.misalen.annotations.Enumeration;
import org.misalen.annotations.ModelComment;
import org.misalen.web.database.model.mysql.BaseSqlModel;

/**
 * 广告订单内容
 * 
 * @author jianhun
 *
 */
@Entity
@Table(name = "ProAdvertOrder")
@DynamicInsert(true)
@DynamicUpdate(true)
public class ProAdvertOrder extends BaseSqlModel {

	@ModelComment("广告名称")
	@Column(name = "orderName", length = 50, nullable = false)
	private String orderName;

	@ModelComment("推广数量")
	@Column(name = "orderNum")
	private Integer orderNum;
	
	@ModelComment("归属用户")
	@Column(name = "userId", nullable = false)
	private String userId;

	@ModelComment("开始日期")
	@Column(name = "startDate")
	private Date startDate;

	@ModelComment("结束日期")
	@Column(name = "stopDate")
	private Date stopDate;
	
	@ModelComment("广告费用")
	@Column(name = "orderAmount")
	private Integer orderAmount;

	@Transient
	@ModelComment("归属用户名")
	private String userName;
	
	@Transient
	@ModelComment("区域范围")
	@Enumeration("pro-city")
	private String belongCity;
	
	@ModelComment("状态")
	@Enumeration("pro-advertising-state")
	@Column(name = "state", nullable = false)
	private String state;
	
	public String getOrderName() {
		return orderName;
	}

	public void setOrderName(String orderName) {
		this.orderName = orderName;
	}
	
	public Integer getOrderNum() {
		return orderNum;
	}

	public void setOrderNum(Integer orderNum) {
		this.orderNum = orderNum;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getStopDate() {
		return stopDate;
	}

	public void setStopDate(Date stopDate) {
		this.stopDate = stopDate;
	}

	public Integer getOrderAmount() {
		return orderAmount;
	}

	public void setOrderAmount(Integer orderAmount) {
		this.orderAmount = orderAmount;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getBelongCity() {
		return belongCity;
	}

	public void setBelongCity(String belongCity) {
		this.belongCity = belongCity;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}
	
}
